<?php

class ThemeController extends Zend_Controller_Action
{

    public function init()
    { 
        $this->_config = Zend_Registry::get('application_config');
    }

    public function preDispatch()
    {
        $this->_helper->layout()->disableLayout();
    }

    public function getThemeAction() {

        $name = $this->getRequest()->getParam('name');
        $themeDir = $this->_config->themes->path;
        require $themeDir.DIRECTORY_SEPARATOR.$name.DIRECTORY_SEPARATOR.$name.'.php';
        $classpre='genesisThemes';
        $theClassName =$classpre.ucfirst($name);
        $class = new $theClassName($name);
        $this->view->result=$class->getCss();
    }
    
}







